package org.example.wax.controller;

import org.example.wax.result.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CallbackController {

    private static final Logger logger = LoggerFactory.getLogger(CallbackController.class);

    @PostMapping(value = "/inventory")
    public AjaxResult inventoryResult(@RequestBody String json) {
        logger.info("inventory: {}", json);
        return AjaxResult.success();
    }

    @PostMapping(value = "/closed")
    public AjaxResult closedCallback(@RequestBody String json) {
        logger.info("closed: {}", json);
        return AjaxResult.success();
    }
}
